// Pipit C标准库 - Math模块示例程序
#include <stdio.h>
#include "../src/pipit_stdlib.h"

int main() {
    printf("Pipit C标准库 - Math模块示例\n");
    
    // 基本运算
    int a = 10, b = 3;
    printf("a = %d, b = %d\n", a, b);
    printf("加法: %d + %d = %d\n", a, b, pipit_add(a, b));
    printf("减法: %d - %d = %d\n", a, b, pipit_subtract(a, b));
    printf("乘法: %d * %d = %d\n", a, b, pipit_multiply(a, b));
    printf("除法: %d / %d = %d\n", a, b, pipit_divide(a, b));
    printf("取模: %d %% %d = %d\n", a, b, pipit_modulo(a, b));
    
    // 高级数学运算
    double base = 2.0, exp = 8.0;
    printf("幂运算: %.2f^%.2f = %.2f\n", base, exp, pipit_power(base, exp));
    
    double x = 16.0;
    printf("平方根: sqrt(%.2f) = %.2f\n", x, pipit_sqrt(x));
    
    int negative = -42;
    printf("绝对值: abs(%d) = %d\n", negative, pipit_abs(negative));
    
    return 0;
}